var sexChart = null;
var zlfsChart = null;
var bllxChart = null;
var zlbwChart = null;
var ageChart = null;
var tnmChart = null;
var egfrChart = null;
var smokeChart = null;

var sexOption = null;
var zlfsOption = null;
var bllxOption = null;
var zlbwOption = null;
var ageOption = null;
var tnmOption = null;
var egfrOption = null;
var smokeOption = null;


function statManagerInit()
{
	
	$("#stat_startDate").css({cursor: 'pointer'});//手型光标
    $("#stat_endDate").css({cursor: 'pointer'});
    $("#stat_t_date").css({cursor: 'pointer'});
    $("#stat_startDate").click(function(){
		WdatePicker({readOnly:true,dateFmt:'yyyy-MM-dd HH:mm:ss'});
    });
    $("#stat_endDate").click(function(){
		WdatePicker({readOnly:true,dateFmt:'yyyy-MM-dd HH:mm:ss'});
    });
    $("#stat_t_date").click(function(){
		WdatePicker({readOnly:true,dateFmt:'yyyy-MM-dd HH:mm:ss'});
    });
	
    getPatCount();
}

function getPatCount()
{
	var url = projectName + "/pat/getPatCount.do?date=" + new Date().getTime();
	var startTime = $("#stat_startDate").val();
	var endTime = $("#stat_endDate").val();
	$.ajax({
		url: url,
		async: false,
		data: {
			startTime: startTime,
			endTiem: endTime
			},
		dataType:"json",
		success: function(data, result){
			var patList = data;
			var count = patList.length;
			var sex_man = 0;
			var sex_women = 0;
			var zlbw_right = 0;
			var zlbw_left = 0;
			var zlbw_two = 0;
			var age_3 = 0;
			var age_4 = 0;
			var age_5 = 0;
			var age_6 = 0;
			var age_7 = 0;
			var tnm_1 = 0;
			var tnm_2 = 0;
			var tnm_3 = 0;
			var tnm_4 = 0;
			var zlfs_1 = 0;
			var zlfs_2 = 0;
			var zlfs_3 = 0;
			var zlfs_4 = 0;
			var zlfs_5 = 0;
			var zlfs_6 = 0;
			var bllx_1 = 0;
			var bllx_2 = 0;
			var bllx_3 = 0;
			var bllx_4 = 0;
			var egfr_yes = 0;
			var egfr_no = 0;
			var smoke_yes = 0;
			var smoke_no = 0;
			
			
			for(var i = 0; i < count; i++)
			{
				if(patList[i].sex == "男"){sex_man++;}else{sex_women++;}
				if(patList[i].age >= 30 && patList[i].age < 40){age_3++;}
				if(patList[i].age >= 40 && patList[i].age < 50){age_4++;}
				if(patList[i].age >= 50 && patList[i].age < 60){age_5++;}
				if(patList[i].age >= 60 && patList[i].age < 70){age_6++;}
				if(patList[i].age >= 70){age_7++;}
				if(patList[i].tumor_site == "1"){zlbw_left++;}
				if(patList[i].tumor_site == "2"){zlbw_right++;}
				if(patList[i].tumor_site == "3"){zlbw_two++;}
				if(patList[i].tnm == "1"){tnm_1++;}
				if(patList[i].tnm == "2"){tnm_2++;}
				if(patList[i].tnm == "3"){tnm_3++;}
				if(patList[i].tnm == "4"){tnm_4++;}
				if(patList[i].pathology == "1"){bllx_1++;}
				if(patList[i].pathology == "2"){bllx_2++;}
				if(patList[i].pathology == "3"){bllx_3++;}
				if(patList[i].pathology == "4"){bllx_4++;}
				if(patList[i].egfr == "1"){egfr_yes++;}
				if(patList[i].egfr == "0"){egfr_no++;}
				if(patList[i].smoke == "1"){smoke_yes++;}
				if(patList[i].smoke == "0"){smoke_no++;}
				if(patList[i].zlfsCount != "")
				{
					var arry = patList[i].zlfsCount.split(",");
					for(var j = 0 ; j < arry.length; j++)
					{
						if(arry[j] == "1"){zlfs_1++;}
						if(arry[j] == "2"){zlfs_2++;}
						if(arry[j] == "3"){zlfs_3++;}
						if(arry[j] == "4"){zlfs_4++;}
						if(arry[j] == "5"){zlfs_5++;}
						if(arry[j] == "6"){zlfs_6++;}
					}
				}
				
			}
			
			var sex_man_per = (sex_man/count*100).toFixed(1);
			var sex_women_per = (sex_women/count*100).toFixed(1);
			
			var zlbw_right_per = (zlbw_right/count*100).toFixed(1);
			var zlbw_left_per = (zlbw_left/count*100).toFixed(1);
			var zlbw_two_per = (zlbw_two/count*100).toFixed(1);
			
			var age_3_per = (age_3/count*100).toFixed(1);
			var age_4_per = (age_4/count*100).toFixed(1);
			var age_5_per = (age_5/count*100).toFixed(1);
			var age_6_per = (age_6/count*100).toFixed(1);
			var age_7_per = (age_7/count*100).toFixed(1);
			
			var tnm_1_per = (tnm_1/count*100).toFixed(1);
			var tnm_2_per = (tnm_2/count*100).toFixed(1);
			var tnm_3_per = (tnm_3/count*100).toFixed(1);
			var tnm_4_per = (tnm_4/count*100).toFixed(1);
			
			var zlfs_1_per = (zlfs_1/count*100).toFixed(1);
			var zlfs_2_per = (zlfs_2/count*100).toFixed(1);
			var zlfs_3_per = (zlfs_3/count*100).toFixed(1);
			var zlfs_4_per = (zlfs_4/count*100).toFixed(1);
			var zlfs_5_per = (zlfs_5/count*100).toFixed(1);
			var zlfs_6_per = (zlfs_6/count*100).toFixed(1);
			
			var bllx_1_per = (bllx_1/count*100).toFixed(1);
			var bllx_2_per = (bllx_2/count*100).toFixed(1);
			var bllx_3_per = (bllx_3/count*100).toFixed(1);
			var bllx_4_per = (bllx_4/count*100).toFixed(1);
			
			var egfr_yes_per = (egfr_yes/count*100).toFixed(1);
			var egfr_no_per = (egfr_no/count*100).toFixed(1);
			
			var smoke_yes_per = (smoke_yes/count*100).toFixed(1);
			var smoke_no_per = (smoke_no/count*100).toFixed(1);
			
			$("#stat_table").empty();
			$("#stat_table").append("<thead><tr><th>临床因素</th><th>n</th><th>X%</th><th>临床因素</th><th>n</th><th>X%</th></tr></thead>");
			$("#stat_table").append("<tbody><tr><td style='font-weight: bold'>患者性别</td><td></td><td></td><td style='font-weight: bold'>治疗方式</td><td></td><td></td></tr>");
			$("#stat_table").append("<tr><td>男性</td><td>"+sex_man+"</td><td>"+sex_man_per+"</td><td>手术治疗</td><td>"+zlfs_1+"</td><td>"+zlfs_1_per+"</td></tr>");
			$("#stat_table").append("<tr><td>女性</td><td>"+sex_women+"</td><td>"+sex_women_per+"</td><td>手术+化疗</td><td>"+zlfs_2+"</td><td>"+zlfs_2_per+"</td></tr>");
			$("#stat_table").append("<tr><td style='font-weight: bold'>肺癌部位</td><td></td><td></td><td>化疗</td><td>"+zlfs_3+"</td><td>"+zlfs_3_per+"</td></tr>");
			$("#stat_table").append("<tr><td>右侧</td><td>"+zlbw_right+"</td><td>"+zlbw_right_per+"</td><td>化疗+放疗</td><td>"+zlfs_4+"</td><td>"+zlfs_4_per+"</td></tr>");
			$("#stat_table").append("<tr><td>左侧</td><td>"+zlbw_left+"</td><td>"+zlbw_left_per+"</td><td>靶向治疗</td><td>"+zlfs_5+"</td><td>"+zlfs_5_per+"</td></tr>");
			$("#stat_table").append("<tr><td>双侧</td><td>"+zlbw_two+"</td><td>"+zlbw_two_per+"</td><td>其他治疗</td><td>"+zlfs_6+"</td><td>"+zlfs_6_per+"</td></tr>");
			$("#stat_table").append("<tr><td style='font-weight: bold'>患者年龄</td><td></td><td></td><td style='font-weight: bold'>病理类型</td><td></td><td></td></tr>");
			$("#stat_table").append("<tr><td>30~39</td><td>"+age_3+"</td><td>"+age_3_per+"</td><td>腺癌</td><td>"+bllx_1+"</td><td>"+bllx_1_per+"</td></tr>");
			$("#stat_table").append("<tr><td>40~49</td><td>"+age_4+"</td><td>"+age_4_per+"</td><td>鳞癌</td><td>"+bllx_2+"</td><td>"+bllx_2_per+"</td></tr>");
			$("#stat_table").append("<tr><td>50~59</td><td>"+age_5+"</td><td>"+age_5_per+"</td><td>小细胞癌</td><td>"+bllx_3+"</td><td>"+bllx_3_per+"</td></tr>");
			$("#stat_table").append("<tr><td>60~69</td><td>"+age_6+"</td><td>"+age_6_per+"</td><td>其他</td><td>"+bllx_4+"</td><td>"+bllx_4_per+"</td></tr>");
			$("#stat_table").append("<tr><td>≥70</td><td>"+age_7+"</td><td>"+age_7_per+"</td><td style='font-weight: bold'>EGFR检测</td><td></td><td></td></tr>");
			$("#stat_table").append("<tr><td style='font-weight: bold'>TNM分期</td><td></td><td></td><td>突变</td><td>"+egfr_yes+"</td><td>"+egfr_yes_per+"</td></tr>");
			$("#stat_table").append("<tr><td>Ⅰ</td><td>"+tnm_1+"</td><td>"+tnm_1_per+"</td><td>未突变</td><td>"+egfr_no+"</td><td>"+egfr_no_per+"</td></tr>");
			$("#stat_table").append("<tr><td>Ⅱ</td><td>"+tnm_2+"</td><td>"+tnm_2_per+"</td><td style='font-weight: bold'>吸烟史</td><td></td><td></td></tr>");
			$("#stat_table").append("<tr><td>Ⅲ</td><td>"+tnm_3+"</td><td>"+tnm_3_per+"</td><td>有</td><td>"+smoke_yes+"</td><td>"+smoke_yes_per+"</td></tr>");
			$("#stat_table").append("<tr><td>Ⅳ</td><td>"+tnm_4+"</td><td>"+tnm_4_per+"</td><td>无</td><td>"+smoke_no+"</td><td>"+smoke_no_per+"</td></tr></tbody>");
			
			$("#statCount").html("总统计人数：" + count);
			
			var sexLegenData = [];
			var sexValueList = [];
			sexLegenData = ['男性','女性'];
			sexValueList.push({'value' : sex_man, 'name' : '男性'});
			sexValueList.push({'value' : sex_women, 'name' : '女性'});
			sexOption.legend.data = sexLegenData;
			sexOption.series[0]['data'] = sexValueList;
			sexChart.setOption(sexOption);
			
			var zlfsLegenData = [];
			var zlfsValueList = [];
			zlfsLegenData = ['手术', '手术and化疗', '化疗', '化疗and放疗', '靶向治疗', '其他治疗'];
			zlfsValueList.push({'value' : zlfs_1, 'name' : '手术'});
			zlfsValueList.push({'value' : zlfs_2, 'name' : '手术and化疗'});
			zlfsValueList.push({'value' : zlfs_3, 'name' : '化疗'});
			zlfsValueList.push({'value' : zlfs_4, 'name' : '化疗and放疗'});
			zlfsValueList.push({'value' : zlfs_5, 'name' : '靶向治疗'});
			zlfsValueList.push({'value' : zlfs_6, 'name' : '其他治疗'});
			zlfsOption.legend.data = zlfsLegenData;
			zlfsOption.series[0]['data'] = zlfsValueList;
			zlfsChart.setOption(zlfsOption);
			
			var bllxLegenData = [];
			var bllxValueList = [];
			bllxLegenData = ['腺癌', '鳞癌', '小细胞癌', '其他'];
			bllxValueList.push({'value' : bllx_1, 'name' : '腺癌'});
			bllxValueList.push({'value' : bllx_2, 'name' : '鳞癌'});
			bllxValueList.push({'value' : bllx_3, 'name' : '小细胞癌'});
			bllxValueList.push({'value' : bllx_4, 'name' : '其他'});
			bllxOption.legend.data = bllxLegenData;
			bllxOption.series[0]['data'] = bllxValueList;
			bllxChart.setOption(bllxOption);
			
			var zlbwLegenData = [];
			var zlbwValueList = [];
			zlbwLegenData = ['左侧', '右侧', '双侧'];
			zlbwValueList.push({'value' : zlbw_left, 'name' : '左侧'});
			zlbwValueList.push({'value' : zlbw_right, 'name' : '右侧'});
			zlbwValueList.push({'value' : zlbw_two, 'name' : '双侧'});
			zlbwOption.legend.data = zlbwLegenData;
			zlbwOption.series[0]['data'] = zlbwValueList;
			zlbwChart.setOption(zlbwOption);
			
			var ageLegenData = [];
			var ageValueList = [];
			ageLegenData = ['30~39', '40~49', '50~59', '60~69', '>=70'];
			ageValueList.push({'value' : age_3, 'name' : '30~39'});
			ageValueList.push({'value' : age_4, 'name' : '40~49'});
			ageValueList.push({'value' : age_5, 'name' : '50~59'});
			ageValueList.push({'value' : age_6, 'name' : '60~69'});
			ageValueList.push({'value' : age_7, 'name' : '>=70'});
			ageOption.legend.data = ageLegenData;
			ageOption.series[0]['data'] = ageValueList;
			ageChart.setOption(ageOption);
			
			var tnmLegenData = [];
			var tnmValueList = [];
			tnmLegenData = ['Ⅰ', 'Ⅱ', 'Ⅲ', 'Ⅳ'];
			tnmValueList.push({'value' : tnm_1, 'name' : 'Ⅰ'});
			tnmValueList.push({'value' : tnm_2, 'name' : 'Ⅱ'});
			tnmValueList.push({'value' : tnm_3, 'name' : 'Ⅲ'});
			tnmValueList.push({'value' : tnm_4, 'name' : 'Ⅳ'});
			tnmOption.legend.data = tnmLegenData;
			tnmOption.series[0]['data'] = tnmValueList;
			tnmChart.setOption(tnmOption);
			
			var egfrLegenData = [];
			var egfrValueList = [];
			egfrLegenData = ['突变', '未突变'];
			egfrValueList.push({'value' : egfr_yes, 'name' : '突变'});
			egfrValueList.push({'value' : egfr_no, 'name' : '未突变'});
			egfrOption.legend.data = egfrLegenData;
			egfrOption.series[0]['data'] = egfrValueList;
			egfrChart.setOption(egfrOption);
			
			var smokeLegenData = [];
			var smokeValueList = [];
			smokeLegenData = ['有吸烟史', '无吸烟史'];
			smokeValueList.push({'value' : smoke_yes, 'name' : '有吸烟史'});
			smokeValueList.push({'value' : smoke_no, 'name' : '无吸烟史'});
			smokeOption.legend.data = smokeLegenData;
			smokeOption.series[0]['data'] = smokeValueList;
			smokeChart.setOption(smokeOption);
			
		},
		error: function(XMLHttpRequest, textStatus, errorThrown){
			alert(XMLHttpRequest.status);
			alert(XMLHttpRequest.readyState)
			alert(textStatus);
		}
	});
}

/**
 * 初始化统计图表
 **/
function initCharts()
{
	var infoWidth = $(".rightinfo").width();
	var box = $(".chartBox");
	var boxLeft = (infoWidth - box.width()) / 2;
	box.css("margin-left",boxLeft + "px");
	var tableLeft = (infoWidth - 750) / 2;
	$(".stat_table").css("margin-left",tableLeft + "px");
	
	sexChart = echarts.init(document.getElementById('sexChart'));
	zlfsChart = echarts.init(document.getElementById('zlfsChart'));
	bllxChart = echarts.init(document.getElementById('bllxChart'));
	zlbwChart = echarts.init(document.getElementById('zlbwChart'));
	ageChart = echarts.init(document.getElementById('ageChart'));
	tnmChart = echarts.init(document.getElementById('tnmChart'));
	egfrChart = echarts.init(document.getElementById('egfrChart'));
	smokeChart = echarts.init(document.getElementById('smokeChart'));
	
	sexOption = {
        tooltip: {
            show: true,
            trigger : 'item',
            formatter: "{b} : {c}"
        },
        title : {
        	text : '性别统计图',
        	x: 'center'
        },
        color:['#4E80BB','#7E629F','#99B958','#BD4E4C'],
        legend: {
        	orient : 'vertical',
        	x : 'left',
        },
        toolbox: {
            show : true,
	        orient: 'vertical',
	        x: 'right',
	        y: 'center',
            feature : {
                dataView : {show: true, readOnly: false},
                magicType : {
                    show: true, 
                    type: ['pie', 'funnel'],
                    option: {
                        funnel: {
                            x: '25%',
                            width: '50%',
                            funnelAlign: 'left',
                            max: 1548
                        }
                    }
                },
                restore : {show: true},
                saveAsImage : {show: true}
            }
        },
        series : [
                {
                    name : '性别',
                    type : 'pie',
                    data : [
                    ]
                },
        ]
    };
	
	zlfsOption = {
	        tooltip: {
	            show: true,
	            trigger : 'item',
	            formatter: "{b} : ({c})"
	        },
	        title : {
	        	text : '治疗统计图',
	        	x: 'center'
	        },
	        color:['#4E80BB','#7E629F','#99B958','#BD4E4C','#5FB3FF','#F49F4D'],
	        legend: {
	        	orient : 'vertical',
	        	x : 'left',
	        },
	        toolbox: {
	            show : true,
		        orient: 'vertical',
		        x: 'right',
		        y: 'center',
	            feature : {
	                dataView : {show: true, readOnly: false},
	                magicType : {
	                    show: true, 
	                    type: ['pie', 'funnel'],
	                    option: {
	                        funnel: {
	                            x: '25%',
	                            width: '50%',
	                            funnelAlign: 'left',
	                            max: 1548
	                        }
	                    }
	                },
	                restore : {show: true},
	                saveAsImage : {show: true}
	            }
	        },
	        series : [
	                {
	                    name : '治疗方式',
	                    type : 'pie',
	                    data : [
	                    ]
	                },
	        ]
	    };
	
	bllxOption = {
			tooltip: {
	            show: true,
	            trigger : 'item',
	            formatter: "{b} : ({c})"
	        },
	        title : {
	        	text : '病理类型统计图',
	        	x: 'center'
	        },
	        color:['#4E80BB','#7E629F','#99B958','#BD4E4C','#5FB3FF','#F49F4D'],
	        legend: {
	        	orient : 'vertical',
	        	x : 'left',
	        },
	        toolbox: {
	            show : true,
		        orient: 'vertical',
		        x: 'right',
		        y: 'center',
	            feature : {
	                dataView : {show: true, readOnly: false},
	                magicType : {
	                    show: true, 
	                    type: ['pie', 'funnel'],
	                    option: {
	                        funnel: {
	                            x: '25%',
	                            width: '50%',
	                            funnelAlign: 'left',
	                            max: 1548
	                        }
	                    }
	                },
	                restore : {show: true},
	                saveAsImage : {show: true}
	            }
	        },
	        series : [
	                {
	                    name : '病理类型',
	                    type : 'pie',
	                    data : [
	                    ]
	                },
	        ]
	};
	
	zlbwOption = {
			tooltip: {
	            show: true,
	            trigger : 'item',
	            formatter: "{b} : ({c})"
	        },
	        title : {
	        	text : '肿瘤部位统计图',
	        	x: 'center'
	        },
	        color:['#4E80BB','#7E629F','#99B958','#BD4E4C','#5FB3FF','#F49F4D'],
	        legend: {
	        	orient : 'vertical',
	        	x : 'left',
	        },
	        toolbox: {
	            show : true,
		        orient: 'vertical',
		        x: 'right',
		        y: 'center',
	            feature : {
	                dataView : {show: true, readOnly: false},
	                magicType : {
	                    show: true, 
	                    type: ['pie', 'funnel'],
	                    option: {
	                        funnel: {
	                            x: '25%',
	                            width: '50%',
	                            funnelAlign: 'left',
	                            max: 1548
	                        }
	                    }
	                },
	                restore : {show: true},
	                saveAsImage : {show: true}
	            }
	        },
	        series : [
	                {
	                    name : '肿瘤部位',
	                    type : 'pie',
	                    data : [
	                    ]
	                },
	        ]
	};
	
	ageOption = {
			tooltip: {
	            show: true,
	            trigger : 'item',
	            formatter: "{b} : ({c})"
	        },
	        title : {
	        	text : '患者年龄统计图',
	        	x: 'center'
	        },
	        color:['#4E80BB','#7E629F','#99B958','#BD4E4C','#5FB3FF','#F49F4D'],
	        legend: {
	        	orient : 'vertical',
	        	x : 'left',
	        },
	        toolbox: {
	            show : true,
		        orient: 'vertical',
		        x: 'right',
		        y: 'center',
	            feature : {
	                dataView : {show: true, readOnly: false},
	                magicType : {
	                    show: true, 
	                    type: ['pie', 'funnel'],
	                    option: {
	                        funnel: {
	                            x: '25%',
	                            width: '50%',
	                            funnelAlign: 'left',
	                            max: 1548
	                        }
	                    }
	                },
	                restore : {show: true},
	                saveAsImage : {show: true}
	            }
	        },
	        series : [
	                {
	                    name : '患者年龄',
	                    type : 'pie',
	                    data : [
	                    ]
	                },
	        ]
	};
	
	
	
	tnmOption = {
			tooltip: {
	            show: true,
	            trigger : 'item',
	            formatter: "{b} : ({c})"
	        },
	        title : {
	        	text : 'TNM分期统计图',
	        	x: 'center'
	        },
	        color:['#4E80BB','#7E629F','#99B958','#BD4E4C','#5FB3FF','#F49F4D'],
	        legend: {
	        	orient : 'vertical',
	        	x : 'left',
	        },
	        toolbox: {
	            show : true,
		        orient: 'vertical',
		        x: 'right',
		        y: 'center',
	            feature : {
	                dataView : {show: true, readOnly: false},
	                magicType : {
	                    show: true, 
	                    type: ['pie', 'funnel'],
	                    option: {
	                        funnel: {
	                            x: '25%',
	                            width: '50%',
	                            funnelAlign: 'left',
	                            max: 1548
	                        }
	                    }
	                },
	                restore : {show: true},
	                saveAsImage : {show: true}
	            }
	        },
	        series : [
	                {
	                    name : 'tnm分期',
	                    type : 'pie',
	                    data : [
	                    ]
	                },
	        ]
	};
	egfrOption = {
			tooltip: {
	            show: true,
	            trigger : 'item',
	            formatter: "{b} : ({c})"
	        },
	        title : {
	        	text : 'EGFR检测统计图',
	        	x: 'center'
	        },
	        color:['#4E80BB','#7E629F','#99B958','#BD4E4C','#5FB3FF','#F49F4D'],
	        legend: {
	        	orient : 'vertical',
	        	x : 'left',
	        },
	        toolbox: {
	            show : true,
		        orient: 'vertical',
		        x: 'right',
		        y: 'center',
	            feature : {
	                dataView : {show: true, readOnly: false},
	                magicType : {
	                    show: true, 
	                    type: ['pie', 'funnel'],
	                    option: {
	                        funnel: {
	                            x: '25%',
	                            width: '50%',
	                            funnelAlign: 'left',
	                            max: 1548
	                        }
	                    }
	                },
	                restore : {show: true},
	                saveAsImage : {show: true}
	            }
	        },
	        series : [
	                {
	                    name : 'EGFR',
	                    type : 'pie',
	                    data : [
	                    ]
	                },
	        ]
	};
	smokeOption = {
			tooltip: {
	            show: true,
	            trigger : 'item',
	            formatter: "{b} : ({c})"
	        },
	        title : {
	        	text : '患者吸烟史统计图',
	        	x: 'center'
	        },
	        color:['#4E80BB','#7E629F','#99B958','#BD4E4C','#5FB3FF','#F49F4D'],
	        legend: {
	        	orient : 'vertical',
	        	x : 'left',
	        },
	        toolbox: {
	            show : true,
		        orient: 'vertical',
		        x: 'right',
		        y: 'center',
	            feature : {
	                dataView : {show: true, readOnly: false},
	                magicType : {
	                    show: true, 
	                    type: ['pie', 'funnel'],
	                    option: {
	                        funnel: {
	                            x: '25%',
	                            width: '50%',
	                            funnelAlign: 'left',
	                            max: 1548
	                        }
	                    }
	                },
	                restore : {show: true},
	                saveAsImage : {show: true}
	            }
	        },
	        series : [
	                {
	                    name : '吸烟史',
	                    type : 'pie',
	                    data : [
	                    ]
	                },
	        ]
	};
	
}

